import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:provider_demo/model/cart_model.dart';
import 'package:provider_demo/page/home_page.dart';

class CartPageWidget extends StatelessWidget {
  const CartPageWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 200),
      child: Center(
        child: Consumer<CartModel>(
          builder: (context, cart, child){
            return Text("count:${cart.cnt}",style: TextStyle(fontSize: 20),);
          },
        ),
      )
    );
  }
}
